<template>
	<view class="cu-modal" :class="props.modalName == props.tag ? 'show' : ''">
		<view class="cu-dialog">
			<view class="padding-xl">
				<view>绑定手机号</view>
				<view class="margin-top-sm text-size-30 text-gray">请先绑定手机号在进行此操作</view>
			</view>
			<view class="padding flex">
				<button class="cu-btn flex-sub round bg-menu text-white" lang="zh_CN"
					open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">
					一键绑定
				</button>
				<button class="cu-btn margin-left flex-sub round line-blue" lang="zh_CN"
					@click="onBindPhone">取\t\t\t\t消</button>
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
	import {
		useSettingStore
	} from '@/stores/index';
	import {
		watch,
		computed,
		ref
	} from 'vue';
	const setting = useSettingStore();
	const emit = defineEmits(['action']);
	const props = defineProps({
		modalName: {
			type: String,
			default: ''
		},
		tag: {
			type: String,
			default: 'AuthorizationModal'
		}
	});
	/**
	 * 获取微信手机号code
	 */
	const decryptPhoneNumber = (e: any) => {
		console.log(e.detail);
		emit('action', e);
	};
	const onBindPhone = () => {
		emit('action');
	};
</script>

<style>
	.swiper-item {
		height: 100%;
	}
</style>
